package com.nwu.records.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName emotion_records
 */
@TableName(value ="emotion_records")
@Data
public class EmotionRecords implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 关联用户时间记录表ID
     */
    private Long userDateRecordsId;

    /**
     * 关联情绪大类表ID
     */
    private Long emotionCategoriesId;

    /**
     * 关联情绪明细表ID
     */
    private Long emotionDetailsId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmotionRecords other = (EmotionRecords) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserDateRecordsId() == null ? other.getUserDateRecordsId() == null : this.getUserDateRecordsId().equals(other.getUserDateRecordsId()))
            && (this.getEmotionCategoriesId() == null ? other.getEmotionCategoriesId() == null : this.getEmotionCategoriesId().equals(other.getEmotionCategoriesId()))
            && (this.getEmotionDetailsId() == null ? other.getEmotionDetailsId() == null : this.getEmotionDetailsId().equals(other.getEmotionDetailsId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserDateRecordsId() == null) ? 0 : getUserDateRecordsId().hashCode());
        result = prime * result + ((getEmotionCategoriesId() == null) ? 0 : getEmotionCategoriesId().hashCode());
        result = prime * result + ((getEmotionDetailsId() == null) ? 0 : getEmotionDetailsId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userDateRecordsId=").append(userDateRecordsId);
        sb.append(", emotionCategoriesId=").append(emotionCategoriesId);
        sb.append(", emotionDetailsId=").append(emotionDetailsId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}